﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using ORM.Common.DataAnnotations;
using ORM.Resources;

namespace ORM.Business.Models.Entities
{
    public class GuideComment
    {
        public int Id { get; set; }
        public int GuideId { get; set; }

       
        public string ContentText { get; set; }

        [RequiredExtended]
        [AllowHtml]
        [Display(Name = "GuideComment_ContentHtml", ResourceType = typeof(Labels))]
        public string ContentHtml { get; set; }

        public int UpVotes { get; set; }
        public int DownVotes { get; set; }
        public int Reports { get; set; }

        [Column("PostedBy")]
        public int PostedBy { get; set; }

        public DateTime PostedDate { get; set; }

        [Column("UpdatedBy")]
        public int? UpdatedBy { get; set; }

        public DateTime LastUpdate { get; set; }
        public bool IsDeleted { get; set; }
        public bool IsReadByGuideAuthor { get; set; }
        [NotMapped]
        public virtual bool IsVotedByCurrentUser { get; set; }

        [NotMapped]
        public virtual bool IsReportedByCurrentUser { get; set; }

        [NotMapped]
        public virtual bool Highlight { get; set; }


        [ForeignKey("GuideId")]
        public virtual Guide Guide { get; set; }

        [ForeignKey("PostedBy")]
        public virtual user PostBy { get; set; }

        [ForeignKey("UpdatedBy")]
        public virtual user UpdateBy { get; set; }

       // public virtual ICollection<ReportedRecipeComment> ReportedComments { get; set; }
        //public virtual ICollection<VotedRecipeComment> VotedComments { get; set; }

    }
}